package com.bowen.demo.demo007;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * <h3>java-study</h3>
 * <p>MyData</p>
 * @author : zhang.bw
 * @date : 2021-04-09 18:05
 **/
class MyData{
	volatile int number = 0;
	Object object = new Object();

	public void addTo60(){
		this.number = 60;
	}

	public void addPlusPlus(){
		this.number++;
	}

	AtomicInteger atomicInteger = new AtomicInteger();

	public void addAtomic(){
		atomicInteger.getAndIncrement();
	}
}
